package com.itheima.ssm.service.impl;

import com.itheima.ssm.dao.IPermessionDao;
import com.itheima.ssm.domain.Pemission;
import com.itheima.ssm.service.IPermessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IPermessionServiceImpl implements IPermessionService {

    @Autowired
    private IPermessionDao iPermessionDao;

    @Override
    public List<Pemission> findAll() throws Exception {
        return iPermessionDao.findAll();
    }

    @Override
    public void save(Pemission pemission) throws Exception {
        iPermessionDao.save(pemission);
    }

    @Override
    public Pemission findById(int permissionId) throws Exception{
        return iPermessionDao.findById(permissionId);
    }
}
